OpenStack Newton : Configure Heat#1
2016/10/27 |
Install OpenStack Orchestration Service (Heat).
This example shows to install Orchestration Services on the existing environment like follows.
For example, install and configure Orchestration Services on the Network Node. | +------------------+ | +------------------------+ | [ Control Node ] | | | [ Network Node ] | | Keystone |10.0.0.30 | 10.0.0.50| DHCP,L3,L2 Agent | | Glance |------------+------------| Metadata Agent | | Nova API |eth0 | eth0| Heat API,API-CFN | | Neutron Server | | | Heat Engine | +------------------+ | +------------------------+ eth0|10.0.0.51 +--------------------+ | [ Compute Node ] | | Nova Compute | | L2 Agent | +--------------------+ |
Add users or databases for Heat services on the Control Node on this section.
|
|
[1] | Install required packages first. |
[root@dlp ~(keystone)]# yum --enablerepo=centos-openstack-newton,epel -y install openstack-heat-common
|
[2] | Add users and so on for Heat services in Keystone on the Control Node. |
# add Heat user [root@dlp ~(keystone)]# openstack user create --domain default --project service --password servicepassword heat +---------------------+----------------------------------+ | Field | Value | +---------------------+----------------------------------+ | default_project_id | fb1ebfb4fe2a4ef3918d02932f4de062 | | domain_id | default | | enabled | True | | id | 56fdd7f09d8344429ad59ef32266fbea | | name | heat | | password_expires_at | None | +---------------------+----------------------------------+ # add Heat user to admin role [root@dlp ~(keystone)]# openstack role add --project service --user heat admin
# create a role for Heat [root@dlp ~(keystone)]# openstack role create heat_stack_owner +-----------+----------------------------------+ | Field | Value | +-----------+----------------------------------+ | domain_id | None | | id | d7159686d85447159a2dc0b53fa1a2ef | | name | heat_stack_owner | +-----------+----------------------------------+[root@dlp ~(keystone)]# openstack role create heat_stack_user +-----------+----------------------------------+ | Field | Value | +-----------+----------------------------------+ | domain_id | None | | id | 8c3cb9efaf1c436bb6691112b5d03e6e | | name | heat_stack_user | +-----------+----------------------------------+ # add admin user to heat_stack_owner role [root@dlp ~(keystone)]# openstack role add --project admin --user admin heat_stack_owner
# create service entry for Heat [root@dlp ~(keystone)]# openstack service create --name heat --description "Openstack Orchestration" orchestration +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Openstack Orchestration | | enabled | True | | id | 8ede84919c5341f68502d2a74cacae64 | | name | heat | | type | orchestration | +-------------+----------------------------------+[root@dlp ~(keystone)]# openstack service create --name heat-cfn --description "Openstack Orchestration" cloudformation +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Openstack Orchestration | | enabled | True | | id | ae9299b2f05541f4bee81dd5a8e2941e | | name | heat-cfn | | type | cloudformation | +-------------+----------------------------------+ # define Heat API server's IP [root@dlp ~(keystone)]# heat_api=10.0.0.50
# create endpoint entry for orchestration (public) [root@dlp ~(keystone)]# openstack endpoint create --region RegionOne orchestration public http://$heat_api:8004/v1/%\(tenant_id\)s +--------------+----------------------------------------+ | Field | Value | +--------------+----------------------------------------+ | enabled | True | | id | 545161969d394020a1449222e124a981 | | interface | public | | region | RegionOne | | region_id | RegionOne | | service_id | 8ede84919c5341f68502d2a74cacae64 | | service_name | heat | | service_type | orchestration | | url | http://10.0.0.50:8004/v1/%(tenant_id)s | +--------------+----------------------------------------+ # create endpoint entry for orchestration (internal) [root@dlp ~(keystone)]# openstack endpoint create --region RegionOne orchestration internal http://$heat_api:8004/v1/%\(tenant_id\)s +--------------+----------------------------------------+ | Field | Value | +--------------+----------------------------------------+ | enabled | True | | id | 9d3056f9aee04802931fce547bf333e9 | | interface | internal | | region | RegionOne | | region_id | RegionOne | | service_id | 8ede84919c5341f68502d2a74cacae64 | | service_name | heat | | service_type | orchestration | | url | http://10.0.0.50:8004/v1/%(tenant_id)s | +--------------+----------------------------------------+ # create endpoint entry for orchestration (admin) [root@dlp ~(keystone)]# openstack endpoint create --region RegionOne orchestration admin http://$heat_api:8004/v1/%\(tenant_id\)s +--------------+----------------------------------------+ | Field | Value | +--------------+----------------------------------------+ | enabled | True | | id | 0fe0496bebcf4824bbca08def3b1d71e | | interface | admin | | region | RegionOne | | region_id | RegionOne | | service_id | 8ede84919c5341f68502d2a74cacae64 | | service_name | heat | | service_type | orchestration | | url | http://10.0.0.50:8004/v1/%(tenant_id)s | +--------------+----------------------------------------+ # create endpoint entry for cloudformation (public) [root@dlp ~(keystone)]# openstack endpoint create --region RegionOne cloudformation public http://$heat_api:8000/v1 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | b910eea3dbc74239abf23acbcfa1ddd6 | | interface | public | | region | RegionOne | | region_id | RegionOne | | service_id | ae9299b2f05541f4bee81dd5a8e2941e | | service_name | heat-cfn | | service_type | cloudformation | | url | http://10.0.0.50:8000/v1 | +--------------+----------------------------------+ # create endpoint entry for cloudformation (internal) [root@dlp ~(keystone)]# openstack endpoint create --region RegionOne cloudformation internal http://$heat_api:8000/v1 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | a765ad95dd944f839af1b2515a2e7c46 | | interface | internal | | region | RegionOne | | region_id | RegionOne | | service_id | ae9299b2f05541f4bee81dd5a8e2941e | | service_name | heat-cfn | | service_type | cloudformation | | url | http://10.0.0.50:8000/v1 | +--------------+----------------------------------+ # create endpoint entry for cloudformation (admin) [root@dlp ~(keystone)]# openstack endpoint create --region RegionOne cloudformation admin http://$heat_api:8000/v1 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | 0cd4a5d5ed264ddf815da058a06bd5bc | | interface | admin | | region | RegionOne | | region_id | RegionOne | | service_id | ae9299b2f05541f4bee81dd5a8e2941e | | service_name | heat-cfn | | service_type | cloudformation | | url | http://10.0.0.50:8000/v1 | +--------------+----------------------------------+ # create Heat domain [root@dlp ~(keystone)]# openstack domain create --description "Stack projects and users" heat +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Stack projects and users | | enabled | True | | id | 28e0da9e10a34556963fdab603a59117 | | name | heat | +-------------+----------------------------------+ # create "heat_domain_admin" user [root@dlp ~(keystone)]# openstack user create --domain heat --password servicepassword heat_domain_admin +---------------------+----------------------------------+ | Field | Value | +---------------------+----------------------------------+ | domain_id | 28e0da9e10a34556963fdab603a59117 | | enabled | True | | id | b0d20405601c45c3bb01d9787b992772 | | name | heat_domain_admin | | password_expires_at | None | +---------------------+----------------------------------+ # add "heat_domain_admin" user to admin role [root@dlp ~(keystone)]# openstack role add --domain heat --user heat_domain_admin admin
|
[3] | Create a database for Heat to MariaDB. |
[root@dlp ~(keystone)]# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 38 Server version: 10.1.17-MariaDB MariaDB Server Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
create database heat; Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on heat.* to heat@'localhost' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on heat.* to heat@'%' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
MariaDB [(none)]> flush privileges; Query OK, 0 rows affected (0.00 sec) exit Bye |